
    <div class="navbar navbar-inverse navbar-fixed-top " role="navigation" style="margin: 0px;">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
                </button>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">

                    <li><a href="{% url 'index' %}"><span class="glyphicon glyphicon-home"></span> 首页</a></li>

                </ul>


                <ul class="nav navbar-nav navbar-right hidden-xs" style="margin-right: 10px;">

                    <!-- 查询 -->
                    <li class="hidden-lg"><a href="websearch/PubHome.html"><span class="glyphicon glyphicon-search"></span></a></li>


                    <!-- 登录注册 -->

                    {% if request.session.logged_in %}
                        <li>
                            <a href="{% url 'article_list' %}">
                                {{ request.current_user }}
                            </a>
                        </li>

                        <li>
                            <a href="{% url 'logout' %}"> 登出 </a>
                        </li>

                    {% else %}
                        <li>
                            <a href="{% url 'login' %}?url={{ request.path_info }} ">
                                <span class="glyphicon glyphicon glyphicon-user"></span>
                                登录
                            </a>
                        </li>

                    {% endif %}




                </ul>


                <form action="{% url 'search' %}" style="margin-top: 10px;" class="navbar-form navbar-right hidden-xs hidden-sm hidden-md" >
                    <div class="form-group">
                        <div class="input-group" style="max-width: 260px;">
                            <input type="text" name="query" class="form-control input-sm" placeholder="检索词..."> 

                            <span class="input-group-btn">
                                <button type="submit" class="btn btn-default btn-sm">
                                    <span class="glyphicon glyphicon-search" aria-hidden="true"></span>检索
                                </button>
                            </span>
                        </div>
                    </div>

                </form>


                <script type="text/javascript">
                    $(function() {
                        //mini搜索栏的高级检索按钮
                        $('#miniSearchPlusButtonId').bind(
                            'click',
                            function() {
                                $('#lucenesearchFormId').attr('action',
                                    "websearch/PubPlus.do");
                                $('#lucenesearchFormId').submit();
                            });
                    });
                </script>

            </div>
        </div>
        <!-- /.navbar-collapse -->
    </div>
